using OneDayModel.Interfaces;
using OneDayModel.Model;

namespace OneDayModel.PresentationLogic
{
    public class UploadPictureUILogic
    {
        private readonly IUploadPictureUI uploadPictureUI;
        private readonly AlbumsWorksModel albumsWorksModel;

        public UploadPictureUILogic(IUploadPictureUI uploadPictureUI, AlbumsWorksModel albumsWorksModel)
        {
            this.uploadPictureUI = uploadPictureUI;
            this.albumsWorksModel = albumsWorksModel;

            uploadPictureUI.OnUploadPicture += uploadPictureUI_OnUploadPicture;
        }

        void uploadPictureUI_OnUploadPicture(object sender, UploadPictureArgs e)
        {
//        IAlbum album = albumsWorksModel.GetAlbumForLoggedInUser(e.AlbumName);

            string onSitePictureName = albumsWorksModel.AddPictureToAlbum(e.AlbumName, e.UploadedFile);
        }
    }
}